package com.mapper;

import com.pojo.Menu;
import com.pojo.MenuExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MenuMapper {
    //根据当前登录用户获取动态菜单
    List<Menu> getMenuAndByUserName(String name);

    //查询所有父菜单下面带子菜单
    List<Menu> queryAll();

    //删除时先判断该菜单下面是否有子菜单
    Integer queryCount(Integer id);

    long countByExample(MenuExample example);

    int deleteByExample(MenuExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Menu record);

    int insertSelective(Menu record);

    List<Menu> selectByExample(MenuExample example);

    Menu selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Menu record, @Param("example") MenuExample example);

    int updateByExample(@Param("record") Menu record, @Param("example") MenuExample example);

    int updateByPrimaryKeySelective(Menu record);

    int updateByPrimaryKey(Menu record);
}